Current Location: Home> Function Categories> pow

pow

Exponential expressions
Name:pow
Category:math
Programming Language:php
One-line Description:Return to the power of y of x.

Definition and usage

The pow() function returns to the y power of x .

Example

 <?php
echo pow ( 4 , 2 ) ;
echo pow ( 6 , 2 ) ;
echo pow ( - 6 , 2 ) ;
echo pow ( - 6 , - 2 ) ;
echo pow ( - 6 , 5.5 ) ;
?>

Try it yourself

grammar

 pow ( x , y )
parameter describe
x Required. A number.
y Required. A number.

illustrate

Returns the power of x to the y power. If possible, this function returns integer.

If the power cannot be calculated, a warning will be issued and pow() will return false. PHP version 4.2.0 starts with pow() and does not generate any warnings.

Similar Functions
  • Absolute value abs

    abs

    Absolutevalue
  • Convert decimal to hexadecimal dechex

    dechex

    Convertdecimaltohexa
  • Convert binary to decimal bindec

    bindec

    Convertbinarytodecim
  • Round the division result intdiv

    intdiv

    Roundthedivisionresu
  • Leave the method of sorting floor

    floor

    Leavethemethodofsort
  • Returns log(1 + number), and can calculate the exact result even when the value of number is close to zero. log1p

    log1p

    Returnslog(1+number)
  • Convert angle to radians deg2rad

    deg2rad

    Convertangletoradian
  • Calculate the index of e exp

    exp

    Calculatetheindexofe
Popular Articles